#!/bin/bash
usage(){
	echo "`basename $0` -c (clean)|-b (build)"
	echo "Usage: $0 <options>"
	echo "  Options:"
	echo "           -d 'library1 library2'"
	echo "             => Bootstrap only specified subdirectories"
	echo "           -j => Run Jobs in Background"
	exit
}

clean(){
	rm -rf autom4te.cache  config.log  config.status  configure aclocal.m4 install-sh missing config.h config.h.in stamp-h1 
	find . \( -name Makefile.in -o -name Makefile \) -exec rm -rf {} \;
}

build(){
	autoreconf -fi
}
while getopts 'cbh' o; do 
  case "$o" in
    c) clean ;; 
    b) build ;; 
    h) usage $0;;
  esac
done

